cmake_minimum_required(VERSION 3.15 FATAL_ERROR)

project(RPC LANGUAGES CXX)

set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_EXTENSIONS OFF)
set(CMAKE_CXX_STANDARD_REQUIRED ON)

#find_package(Boost 1.75 REQUIRED COMPONENTS coroutine)

#message("BOOST_INCLUDEDIR: ${BOOST_INCLUDEDIR}")

#find_package(Protobuf REQUIRED)

list(APPEND flags "-fPIC" "-Wall")
if(NOT WIN32)
  list(APPEND flags "-Wextra" "-Wpedantic")
endif()

add_library(RpcMessage RpcMessage.cpp RpcMessage.h)

target_compile_options(RpcMessage
  PRIVATE
    ${flags}
  )

add_executable(RpcClient main.cpp)

target_compile_options(RpcMessage
  PRIVATE
    "-fPIC"
  )

target_link_libraries(RpcClient
        PUBLIC
        RpcMessage
        pthread
        )







